package com.firebird.oms.domain.sm;

// Generated 2009-11-20 18:24:23 by Hibernate Tools 3.2.5.Beta

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * TismWorkerChgPwd generated by hbm2java
 */
@Entity
@Table(name = "tism_worker_chg_pwd", uniqueConstraints = @UniqueConstraint(columnNames = "login_id"))
public class TismWorkerChgPwd implements java.io.Serializable {

	private static final long serialVersionUID = 5930745843907585231L;
	private int id;
	private int loginId;
	private String beforePwd;
	private String afterPwd;
	private Date chgPwdTime;

	public TismWorkerChgPwd() {
	}

	public TismWorkerChgPwd(int id, int loginId, String beforePwd,
			String afterPwd, Date chgPwdTime) {
		this.id = id;
		this.loginId = loginId;
		this.beforePwd = beforePwd;
		this.afterPwd = afterPwd;
		this.chgPwdTime = chgPwdTime;
	}

	@Id
	@Column(name = "id", unique = true, nullable = false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column(name = "login_id", unique = true, nullable = false)
	public int getLoginId() {
		return this.loginId;
	}

	public void setLoginId(int loginId) {
		this.loginId = loginId;
	}

	@Column(name = "before_pwd", nullable = false, length = 36)
	public String getBeforePwd() {
		return this.beforePwd;
	}

	public void setBeforePwd(String beforePwd) {
		this.beforePwd = beforePwd;
	}

	@Column(name = "after_pwd", nullable = false, length = 36)
	public String getAfterPwd() {
		return this.afterPwd;
	}

	public void setAfterPwd(String afterPwd) {
		this.afterPwd = afterPwd;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "chg_pwd_time", nullable = false, length = 0)
	public Date getChgPwdTime() {
		return this.chgPwdTime;
	}

	public void setChgPwdTime(Date chgPwdTime) {
		this.chgPwdTime = chgPwdTime;
	}

	public boolean equals(final Object other) {
		if (!(other instanceof TismWorkerChgPwd))
			return false;
		TismWorkerChgPwd castOther = (TismWorkerChgPwd) other;
		return new EqualsBuilder().append(id, castOther.id).append(loginId,
				castOther.loginId).append(beforePwd, castOther.beforePwd)
				.append(afterPwd, castOther.afterPwd).append(chgPwdTime,
						castOther.chgPwdTime).isEquals();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(id).append(loginId).append(
				beforePwd).append(afterPwd).append(chgPwdTime).toHashCode();
	}

	public String toString() {
		return new ToStringBuilder(this).append("id", id).append("loginId",
				loginId).append("beforePwd", beforePwd).append("afterPwd",
				afterPwd).append("chgPwdTime", chgPwdTime).toString();
	}

}
